//
//  WHSwiftTool.swift
//  0831-单例
//
//  Created by 吴涵 on 15/8/31.
//  Copyright © 2015年 wuhan. All rights reserved.
//

import UIKit

class WHSwiftTool: NSObject {
    
    //static id instance;
    //
    //static dispatch_once_t onceToken;
    //dispatch_once(&onceToken, ^{
    //instance = [[self alloc] init];
    //});
    //return instance;

    
    static var instance:WHSwiftTool?
    
    static var once: dispatch_once_t = 0
    
    class func sharedTool() -> WHSwiftTool? {
        dispatch_once(&once) { () -> Void in
             instance  = WHSwiftTool()
        }
       
        return instance
    }
    

//    static let sharedTool:WHSwiftTool = WHSwiftTool()
//    
//    override init() {
//        print("12312")
//    }
}
